package com.renli.controller;

import com.renli.bean.ResultJson;
import com.renli.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Api("我的工作平台")
@RestController("/workSpace")
public class WorkSpaceController {

    @Autowired
    private LoginService loginService;

    @ApiOperation(value = "验证本次登录密码",notes = "验证本次登录密码",response = ResultJson.class,
    httpMethod = "post")
    @RequestMapping(value = "/checkOldPassword",method = RequestMethod.POST)
    public ResultJson checkOldPassword(@RequestBody @ApiParam(name = "map",value = "当前登录用户id（id），当前登录密码（password）") Map<String,String> map){

        return loginService.checkPassword(map);
    }


    @RequestMapping(value = "/updatePassword",method = RequestMethod.POST)
    public ResultJson updatePassword(@RequestBody @ApiParam Map<String,String> map){
        return null;

    }

}
